<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h1>App</h1>
    <p>
      <u>this p tag</u>
      <b>lucy</b>
      <i>jack</i>
    </p>
    <div>this div</div>

    <script>
      const p = document.body.childNodes[3];

      // console.log(p.parentNode);
      // console.log(p.childNodes);
      // console.log(p.lastChild);
      // console.log(p.firstChild);
      console.log(p.nextSibling.nextSibling);
      console.log(p.previousSibling.previousSibling);
      console.log(p.parentNode.parentNode.parentNode);
    </script>
  </body>
</html>
